using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Produce.Domain.Entities
{
    /// <summary>
    /// 人员排班实体
    /// </summary>
    [SugarTable("PRODUCTION_PERSON_SCHEDULE")]
    public class ProductionPersonSchedule : BaseEntity
    {
        /// <summary>
        /// 人员ID
        /// </summary>
        [SugarColumn(ColumnName = "PERSON_ID", IsNullable = false)]
        public long PersonId { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary>
        [SugarColumn(ColumnName = "PERSON_NAME", IsNullable = false, Length = 50)]
        public string PersonName { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SugarColumn(ColumnName = "SCHEDULE_DATE", IsNullable = false)]
        public DateTime? Date { get; set; }

        /// <summary>
        /// 班次类型（0-休息，1-上班，2-加班，3-请假）
        /// </summary>
        [SugarColumn(ColumnName = "SCHEDULE_TYPE", IsNullable = false)]
        public int Type { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "REMARK", IsNullable = true, Length = 500)]
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "CREATED_AT", IsNullable = false)]
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "CREATED_BY", IsNullable = false, Length = 50)]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "UPDATED_AT", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [SugarColumn(ColumnName = "UPDATED_BY", IsNullable = true, Length = 50)]
        public string UpdatedBy { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnName = "IS_DELETED", IsNullable = false)]
        public bool IsDeleted { get; set; }
    }
}